package net.hn.hnms.biz.quality.domain;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

/**
 * Author: ly
 * 煤质信息表
 */
@Data
@NoArgsConstructor
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = false)
@Table(name = "coal_quality")
@ContentFontStyle(fontHeightInPoints = 15)
@HeadStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 26)
@ColumnWidth(20)
@HeadRowHeight(30)
public class CoalQuality extends BaseModel implements Serializable {
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_UUID)
    private String coalQualityId;
    @ApiModelProperty(value = "日期")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @NotNull(message = "日期不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    @ExcelProperty(value = "日期")
    private Date coalQualityDate;


    @ApiModelProperty(value = "运销方式，外销:1  内销:0")
    @Length(max = 0, message = "外销:1  内销:0长度不能超过0个字符")
    @NotBlank(message = "外销:1  内销:0不能为空")
    @ExcelProperty(value = "销售类型")
    private String sellWay;

    @ApiModelProperty(value = "销售量")
    @NotBlank(message = "销售量不能为空")
    @ExcelProperty(value = "销售量")
    private BigDecimal salesVolume;


    @ApiModelProperty(value = "全水分（%）")
    @Digits(integer = 0, fraction = 2, message = "全水分（%）格式不正确")
    @DecimalMin(value = "0.00", message = "全水分（%）格式不正确")
    @NotNull(message = "全水份（%）不能为空")
    @ExcelProperty(value = "全水分")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal moistureTotal;

    @ApiModelProperty(value = "灰份（%）")
    @Digits(integer = 0, fraction = 2, message = "灰份（%）格式不正确")
    @DecimalMin(value = "0.00", message = "灰份（%）格式不正确")
    @NotNull(message = "灰份（%）不能为空")
    @ExcelProperty(value = "灰分")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal ash;


    @ApiModelProperty(value = "挥发份")
    @NotBlank(message = "挥发份不能为空")
    @ExcelProperty(value = "挥发份")
    private BigDecimal volatileMatter;



    @ApiModelProperty(value = "含矸率（%）")
    @Digits(integer = 0, fraction = 2, message = "含矸率（%）格式不正确")
    @DecimalMin(value = "0.00", message = "含矸率（%）格式不正确")
    @NotNull(message = "含矸率（%）不能为空")
    @ExcelProperty(value = "全硫分")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal shaleContent;

    @ApiModelProperty(value = "低位发热量(MJ/KG)")
    @Digits(integer = 0, fraction = 2, message = "低位发热量(MJ/KG)格式不正确")
    @DecimalMin(value = "0.00", message = "低位发热量(MJ/KG)格式不正确")
    @NotNull(message = "低位发热量(MJ/KG)不能为空")
    @ExcelProperty(value = "发热量")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal netCalorificValue;
    @ApiModelProperty(value = "禁用:1  启用:0")
    @Length(max = 0, message = "禁用:1  启用:0长度不能超过0个字符")
    @NotBlank(message = "禁用:1  启用:0不能为空")
    private String status = "0";











}








